"""
@author: tk
@file: rand.py
@time: 2022/11/4 23:50
"""
import random
# 随机点名系统， 可以支持请假，抽点过了之后就不用再点了
people = ['史珍香', '杜子腾', '元子诞', '沙光光', '任扎', '董士掌', 'awk', 'sed', 'grep', 'ls', 'll', 'pwd']  # 全班人

cla = ['史珍香', '杜子腾', '元子诞', '沙光光', '任扎', '董士掌']  # 上课的
rest = ['awk', 'sed', 'grep']  # 请假的
run = ['ls', 'll', 'pwd']  # 逃课的
c = []
i = 0

for i in range(len(people)):
    rand = random.choice(people)
    people.pop(people.index(rand))
    print(f"下面点到的是:{rand}")
    if rand in rest:
        print(f"报告老师{rand}请假了\n")
    elif rand in cla:
        print("到!\n")
    else:
        print("逃课,记大过\n")

